package easyway.train.testejb.ejb.bean;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;
import javax.ejb.Stateless;
import javax.interceptor.Interceptors;

import com.ibatis.dao.client.DaoManager;

import easyway.core.dao.DaoConfig;
import easyway.core.exceptions.ExceptionHandler;
import easyway.core.utils.CollectionUtil;
import easyway.core.utils.PaginationSupport;
import easyway.train.testejb.dao.TestejbDAO;
import easyway.train.testejb.domain.Testejb;
import easyway.train.testejb.ejb.faces.TestejbLocal;
import easyway.train.testejb.ejb.faces.TestejbRemote;

/**
*
* @author zhangqihang
* @date Nor 23, 2009
*/
@Stateless
public class TestejbBean implements TestejbLocal, TestejbRemote {

	private TestejbDAO answerbankDAO;
	
	public TestejbBean() {
	}
	@PostConstruct
	public void init() {
		DaoManager daoManager = DaoConfig.getDaoManager();
		answerbankDAO = (TestejbDAO) daoManager.getDao(TestejbDAO.class);
	
	}
	
	@Interceptors(ExceptionHandler.class)
	public PaginationSupport queryForListPageTestejbResult(
			Map<String, Serializable> map) {
		return null;
	}
	@Interceptors(ExceptionHandler.class)
	public List<Testejb> queryTestejbByMap(Map<String, Serializable> map) {
		return answerbankDAO.queryList("Testejb.queryTestejbByMap",map);
	}
}
